package cn.ljy.authority.model;

import cn.ljy.common.model.BaseModel;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 字典列表
 * @author ljy
 * @date 2022-8-13 13:33
 */
@ApiModel(value="字典")
@Data
public class SysDictItem extends BaseModel {
    private String id;
    @NotNull(message = "字典列表项必须有所属的字典")
    private SysDict sysDict;//字典外键
    @NotBlank(message = "字典列表项名称不能为空")
    @Length(min = 1, max = 30, message = "字典列表项名称必须在 {min} - {max} 之间")
    private String dictKey;
    @NotBlank(message = "字典列表项的值不能为空")
    @Length(min = 1, max = 30, message = "字典列表项的值名称必须在 {min} - {max} 之间")
    private String dictValue;
    @NotNull(message = "排序不能为空")
    private Short sort;//排序，升序
    private String intro;
}
